<?php
namespace Fyfyu\Admin\Traits;

use Hyperf\Di\Annotation\Inject;

use Fyfyu\Admin\Layout\Grid;
use Fyfyu\Admin\Layout\Form;
use Fyfyu\Admin\Layout\Table;

trait Layout
{
    /**
     * @Inject
     * @var Grid
     */
    protected $grid;
    /**
     * @Inject
     * @var Form
     */
    protected $form;
    /**
     * @Inject
     * @var Table
     */
    protected $table;

    public function setTitle(String $title){
        $this->title = $title;
        return $this;
    }
    public function getTitle(){
        return $this->title;
    }
    protected function table(){
        $this->table->setTitle($this->getTitle());
        return $this->table;
    }
    protected function form(){
        return [];
    }
    protected function grid(){
        return [];
    }
}
